#!/usr/bin/env python

from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, bool_t, double_t, int_t

gen = ParameterGenerator()

gen.add("enabled", bool_t, 0, "Whether to apply this plugin or not", True)
gen.add("footprint_clearing_enabled", bool_t, 0, "Whether to clear the robot's footprint of lethal obstacles", True)
gen.add("max_obstacle_height", double_t, 0, "The maximum height of any obstacle to be inserted into the costmap in meters.", 2, 0, 50)

combo_enum = gen.enum([gen.const("Overwrite", int_t,  0, "Overwrite values"),
                       gen.const("Maximum",   int_t,  1, "Take the maximum of the values"),
                       gen.const("Nothing",   int_t, 99, "Do nothing")],
                       "Method for combining layers enum")
gen.add("combination_method", int_t, 0, "Method for combining two layers", 1, edit_method=combo_enum)


# gen.add("obstacle_max_range", double_t, 0, "The default maximum distance from the robot at which an obstacle will be inserted into the cost map in meters.", 2.5, 0, 50)
# gen.add("obstacle_min_range", double_t, 0, "The default minimum distance from the robot at which an obstacle will be inserted into the cost map in meters.", 0.0, 0, 50)
# gen.add("raytrace_max_range", double_t, 0, "The default maximum range in meters at which to raytrace out obstacles from the map using sensor data.", 3, 0, 50)
# gen.add("raytrace_min_range", double_t, 0, "The default minimum range in meters from which to raytrace out obstacles from the map using sensor data.", 0.0, 0, 50)
exit(gen.generate("nav2_costmap_2d", "nav2_costmap_2d", "ObstaclePlugin"))
